﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ERPSystem.Common.DTO
{
    public class PurchaseReturnOrderBackFillDto
    {
        /// <summary>
        /// 主键自增
        /// </summary>
        public int PurchaseReturnOrderId { get; set; }
        /// <summary>
        /// 单据编码
        /// </summary>

        public string? PurchaseReturnOrderNo { get; set; }
        /// <summary>
        /// 流水号
        /// </summary>

        public string? PurchaseReturnOrderSerialNumber { get; set; }
        /// <summary>
        /// 业务类型
        /// </summary>

        public int BusinessType { get; set; }//业务类型
        /// <summary>
        /// 采购单号
        /// </summary>

        public string? PurchaseOrderNo { get; set; }//采购单号
        /// <summary>
        /// 备注信息
        /// </summary>

        public string? DescInfo { get; set; }
        /// <summary>
        /// 单据日期
        /// </summary>

        public DateTime? DocumentDate { get; set; }
        /// <summary>
        /// 操作员
        /// </summary>

        public string? Operator { get; set; }
        /// <summary>
        /// 供应商
        /// </summary>

        public string? Supplier { get; set; }
        /// <summary>
        /// 单据状态
        /// </summary>

        public int DocumentsStatus { get; set; }
        /// <summary>
        /// 审核员
        /// </summary>

        public string? Audit { get; set; }//审核员 
        /// <summary>
        /// 退货仓库
        /// </summary>

        public int ReturnsWarehouse { get; set; }
        /// <summary>
        ///业务状态
        /// </summary>

        public int BusinessStatus { get; set; }
        /// <summary>
        /// 审核日期
        /// </summary>

        public DateTime? AuditDate { get; set; }
        /// <summary>
        /// 退货原因
        /// </summary>

        public int ReasonForReturn { get; set; }
        public List<PurchaseReturnOrderSubtableBackFillDto> purchaseReturnOrderSubtableBackFillDtos { get; set; }
    }
    public class PurchaseReturnOrderSubtableBackFillDto
    {
        /// <summary>
        /// 主键编号
        /// </summary>
        public int PurchaseReturnOrderSubtableId { get; set; }
        /// <summary>
        ///跟单编号
        /// </summary>

        public string? CopyNo { get; set; }
        /// <summary>
        /// 物料编码
        /// </summary>

        public string? MaterialNo { get; set; }
        /// <summary>
        /// 物料名称
        /// </summary>

        public string? MaterialName { get; set; }
        /// <summary>
        /// 批号
        /// </summary>

        public string? LotNumber { get; set; }
        /// <summary>
        /// 数量
        /// </summary>

        public int Num { get; set; }
        /// <summary>
        /// 出库数量
        /// </summary>

        public int OutboundShipmentsNum { get; set; }
        /// <summary>
        /// 退货说明
        /// </summary>

        public string? ReturnInstructions { get; set; }
        /// <summary>
        /// 流水号 外键
        /// </summary>

        public string? PurchaseReturnOrderSerialNumber { get; set; }

        /// <summary>
        /// 型号规格
        /// </summary>
        [SugarColumn(ColumnDataType = "Nvarchar(100)", IsNullable = true)]
        public string TypeSpecification { get; set; } = "件";
        /// <summary>
        /// 主计量
        /// </summary>
        [SugarColumn(ColumnDataType = "Nvarchar(100)", IsNullable = true)]
        public string DocumentType { get; set; } = "10";
    }
}
